<?php

/*
 * 商品模型
 * @author sky
 * create_time 2017-04-30
 */

namespace App\Admin\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
use Intervention\Image\Constraint;
use Intervention\Image\Facades\Image;
use Illuminate\Support\Facades\Storage;

class Cart extends Model {

public $timestamps = false;
protected $table = 'mini_Cart';

     /*
     * 购物车
     * @author sky
     * create_time 2017-03-26
     */
  
    // 购物车列表
    public static function CartList(){
    	return Cart::get();
    }
    // 购物车详情
    public static function CartDetail($Cartid){
        return Cart::where("id", $Cartid)->get();
    }
     // 删除购物车
    public static function CartDeleted($Cartid){
    	return Cart::where("id", $Cartid)->delete();
    }
     // 修改购物车
    public static function CartUpdate($Cartid,$arr){
        return Cart::where('id',$Cartid)->update($arr);
    }
}

